home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gigarom 1
/
Gigarom Macintosh Archives (Quantum Leap)(CDRM1080320)(1993).iso
/
FILES
/
HYP
/
E-G
/
educationstacks.sea
/
Circuits
/
card_3106.txt
< prev
next >
Wrap
Text File
|
1989-02-26
|
7KB
|
323 lines
-- card: 3106 from stack: in
-- bmap block id: 4455
-- flags: 4000
-- background id: 2693
-- name:
----- HyperTalk script -----
on calculate
get char 1 of card field "EMF"
if it="+" then
delete char 1 of card field "EMF"
end if
put card field "EMF" into E
get char 1 of card field "R1"
if it="+" then
delete char 1 of card field "R1"
end if
put card field "R1" into R1
put abs(R1) into R1
put R1 into card field "R1"
get char 1 of card field "R2"
if it="+" then
delete char 1 of card field "R2"
end if
put card field "R2" into R2
put abs(R2) into R2
put R2 into card field "R2"
if E=0 then
send zeroall
exit calculate
end if
if R1=0 and R2=0 then
put "zap" into card field "A1"
put 0 into card field "V1"
put 0 into card field "V2"
put 0 into card field "V3"
exit calculate
end if
put E/(R1+R2) into I
put I*R1 into V1
put I*R2 into V2
set numberFormat to "0.000"
put I into card field "A1"
put V1 into card field "V1"
put V2 into card field "V2"
put E*1 into card field "V3"
end calculate
on closeField
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
end closeField
on zeroall
put 0 into card field "A1"
put 0 into card field "V1"
put 0 into card field "V2"
put 0 into card field "V3"
end zeroall
-- part 1 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=222 top=20 right=47 bottom=284
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: EMF
-- part 2 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=138 top=178 right=205 bottom=200
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: R1
-- part 3 (field)
-- low flags: 00
-- high flags: 0000
-- rect: left=300 top=179 right=206 bottom=362
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 18
-- style flags: 256
-- line height: 24
-- part name: R2
-- part 4 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=6 top=125 right=140 bottom=62
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: A1
-- part 7 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=232 top=133 right=148 bottom=292
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: V3
-- part 8 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=144 top=268 right=283 bottom=200
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: V1
-- part 9 (field)
-- low flags: 01
-- high flags: 0002
-- rect: left=308 top=268 right=283 bottom=364
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 65535
-- font id: 3
-- text size: 10
-- style flags: 256
-- line height: 13
-- part name: V2
-- part 10 (button)
-- low flags: 00
-- high flags: 4001
-- rect: left=429 top=109 right=129 bottom=441
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 closed
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 11 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=417 top=109 right=129 bottom=429
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 middle
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 12 (button)
-- low flags: 00
-- high flags: 0001
-- rect: left=405 top=109 right=129 bottom=417
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: S1 open
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part 13 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=443 top=110 right=129 bottom=504
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Switch
----- HyperTalk script -----
on mouseUp
get hilite of card button "S1 closed"
if it=true then
set hilite of card button "S1 closed" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 open" to true
send zeroall
else
set hilite of card button "S1 open" to false
set hilite of card button "S1 middle" to true
set hilite of card button "S1 middle" to false
set hilite of card button "S1 closed" to true
send calculate
end if
end mouseUp
-- part contents for background part 8
----- text -----
C2. Series
-- part contents for card part 4
----- text -----
0.800
-- part contents for card part 8
----- text -----
8.000
-- part contents for card part 9
----- text -----
16.000
-- part contents for card part 7
----- text -----
24.000
-- part contents for card part 1
----- text -----
24
-- part contents for card part 2
----- text -----
10
-- part contents for card part 3
----- text -----
20